﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EnumWinForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        enum Colors
        {
            red,
            blue,
            white,
            black,
            yellow = 7,
            purple,
            brown,
            orange
        };

        private void btnShow_Click(object sender, EventArgs e)
        {
            string text = "Red:" + (int)Colors.red + Environment.NewLine;
            text += "blue:" + (int)Colors.blue + Environment.NewLine;
            text += "white:" + (int)Colors.white + Environment.NewLine;
            text += "black:" + (int)Colors.black + Environment.NewLine;
            text += "yellow:" + (int)Colors.yellow + Environment.NewLine;
            text += "purple:" + (int)Colors.purple + Environment.NewLine;
            text += "brown:" + (int)Colors.brown + Environment.NewLine;
            text += "orange:" + (int)Colors.orange + Environment.NewLine;
            textBox1.Text = text;
        }
    }
}